<?php
include "connect.php";
$user = $_COOKIE['user'];
if(empty($user))
{
	header("Location: login.php");
	exit;
}
$ins = "select count(*) from user where name='{$name}' and password='{$password}'";
$result = mysql_query($ins, $dbLink);
$row = mysql_fetch_row($result);
$count = $row[0];
if ($count = 0)
{
	header("Location: login.php");
	exit;
}
?>
